# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=chaosmap
pkgver=1.3
pkgrel=7
groups=('blackarch' 'blackarch-forensic' 'blackarch-scanner' 'blackarch-recon')
pkgdesc="An information gathering tool and dns / whois / web server scanner"
arch=('any')
url='http://freecode.com/projects/chaosmap'
license=('GPL')
depends=('python2')
source=("https://dl.packetstormsecurity.net/UNIX/utilities/$pkgname-$pkgver.tar.gz")
sha512sums=('4783b796b192bc98f759ec68dc968468b24b0e19894765a6319b8e7e3bd9702cf66ff9fc0103d0a6648850ac76c9ad15eb9eb322d9e302fb42f4ee2bd50a7a93')

package() {
  cd balle-chaosmap-400658d

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/chaosmap" TODO README CHANGES

  cp -a "$pkgname.py" dictionaries lib "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname
exec ./$pkgname.py "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

